<?
include("session.php");

$default_start_date = date("Y")."-01-01";
//$default_start_date = date("Y-m-d", strtotime("-1 year"));
$default_end_date = date("Y-m-d");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/webkit/utils/jquery.js"></script>
<script type="text/javascript" src="/webkit/dialog/import.js"></script>
<script type="text/javascript" src="/webkit/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="/webkit/charts/import.js"></script>
<link type="text/css" rel="stylesheet" href="page.css"/>
<style>	input {vertical-align:middle} </style>
</head>
<body onload="show_report_charts()">

<table width=100% height=100% cellspacing=0 cellpadding=0>
	<tr>
	<td>
		<table width=100% height=100% id="chartsTable">
		<tr><td id="chartContainer1" align=center valign=middle><font style="font-size:12px;color:gray">图表加载中，请稍候... <img src="loading.gif"></font></td></tr>
		</table>
	</td>
	</form>
	</tr>
</table>

<script type="text/javascript">

	var chart = new FusionCharts("/webkit/charts/Pie3D.swf",  "chart", "100%", "100%", "0", "1" );     
	
	function show_report_charts() {
		$.get("report_query.php?action=result_chart_report&task_id=<?echo $_GET['task_id']?>&agent_group="+encodeURI('<?echo $_GET['agent_group']?>')+"&date_range=<?echo $_GET['date_range']?>", function(data){
			//alert(data)
			eval("var json = "+data);
			chart.setJSONData(json);
			chart.render('chartContainer1');  
		});

		
	}
</script>
</body>
</html>
